import url from './baseUrl'
import axios from '@/utils/requires'

/* 引入Mockajax */
import mockAjax from '@/utils/Mockjs/mockAjax'
export default {
    /* 分类列表 */
   reqCategory:()=>{
        return axios.get(url.baseUrl+url.category)
    },
    /* 获取Banner */
    reqBanner:()=>{
        return axios.get(url.baseUrl+url.banner)
    },
    /* 登陆 */
    reqLogin:(params)=>{
        return axios.post(url.baseUrl + url.login,params)
    },
    /* 模拟请求地址 */
    mockBanner:()=>{
        return mockAjax({
            method:"get",
            url:"/banner"
        })
    },
    mockMenus(){
        return mockAjax({
            url:'/menus',
            method:'get'
        })
    },
    // 获取分类中所有产品
    reqGoodsList:(category)=>{
        return axios.get(url.baseUrl+url.goodsList,category)

    },
    
}

